<?php
//开启session
  


 if(!empty($_SERVER['HTTP_X_REQUESTED_WITH'])){

         
         $data['status'] = $_GET['val'];
        


edit('news',$_GET['id'],$data);

      // $sql = "update`news` set `status`='$val' where`id`=$id";
      //   //编写执行语句
      //     mysqli_query($link,$sql);
           // 获取影响的行数
        echo $_rows = mysqli_affected_rows($link);

        die;
       }
  


  

?>

